<template>
	<!--index.wxml-->
	<view>
		<view class="home_nav">
			<view class="nav_top">
				<view class="top_left">
					<view class="left_item">
						<text class="text_right">今日业绩</text>
					</view>
					<view class="right_item">
						<image src="/static/images/msg.png" style="width:27rpx;height:32rpx"></image>
					</view>
				</view>
				<view class="top_right">
					<image src="/static/images/add.png" style="width:40rpx;height:40rpx"></image>
				</view>
			</view>
			<view class="content">
				<view class="home_content">
					<view class="content_item">
						<text>{{datas.appointmentOrder}}</text>
						<text>预约订单</text>
					</view>
					<view class="content_item">
						<text>{{datas.completeOrder}}</text>
						<text>完成订单</text>
					</view>
					<view class="content_item">
						<text>{{datas.visitorCount}}</text>
						<text>访问数量</text>
					</view>
				</view>
				<view class="hr"></view>
				<view class="home_content">
					<view class="content_item">
						<text>{{datas.distributionOrder}}</text>
						<text>分销订单</text>
					</view>
					<view class="content_item">
						<text>{{datas.moneyCount}}</text>
						<text>支付收入</text>
					</view>
					<view class="content_item">
						<text>{{datas.balance}}</text>
						<text>店铺余额</text>
					</view>
				</view>
			</view>

		</view>
		<view class="navagitor">
			<view class="navagitor_left">
				<view class="leftItem">日常营业</view>
			</view>
			<view class="navagitor_right" @click="goTime()">
				<view class="rightItem_left">时间管理</view>
				<view class="rightItem_right">
					<image src="/static/images/jiantou.png" style="width:28rpx;height:28rpx"></image>
				</view>
			</view>
		</view>
		<view class="grid">
			<view class="grid_title">
				<view class="navagitor_left">
					<view class="leftItem">管理应用</view>
				</view>
			</view>
			<view class="grid_list">
				<view class="grid_item">
					<view @click="goStore">
						<image src="/static/images/dianpu.png"></image>
						<view>店铺管理</view>
					</view>
					<view @click="goServe">
						<image src="/static/images/fuwu.png"></image>
						<view>全部服务</view>
					</view>
					<view @click="goOrder">
						<image src="/static/images/dingdan.png"></image>
						<view>订单管理</view>
					</view>
					<view @click="goMarketing()">
						<image src="/static/images/yingxiao.png"></image>
						<view>营销管理</view>
					</view>
				</view>
				<view class="grid_item">
					<view>
						<image src="/static/images/hexiao.png"></image>
						<view>验证核销</view>
					</view>
					<view @click="goCustomer()">
						<image src="/static/images/guke.png"></image>
						<view>顾客管理</view>
					</view>
					<view>
						<image src="/static/images/shouru.png"></image>
						<view>资产收入</view>
					</view>
					<view @click="goStaff()">
						<image src="/static/images/yuangong.png"></image>
						<view>员工管理</view>
					</view>
				</view>
				<view class="grid_item">
					<view @click="goTechnician()">
						<image src="/static/images/jishi.png"></image>
						<view>技师管理</view>
					</view>
					<view>
						<image src="/static/images/tongji.png"></image>
						<view>数据统计</view>
					</view>
					<view></view>
					<view></view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		HomeInfor
	} from '@/admin_api/index.js'
	export default {
		data() {
			return {
				datas: {}
			};
		},
		components: {},
		props: {},
		methods: {
			// 营销管理
			goMarketing(){
				uni.navigateTo({
					url:'/pagesF/marketing/index'
				})
			},
			// 技师管理
			goTechnician(){
				uni.navigateTo({
					url:'/pagesF/technician/technician'
				})
			},
			// 员工管理
			goStaff(){
				uni.navigateTo({
					url:'/pagesF/staff/staff'
				})
			},
			// 顾客管理
			goCustomer(){
				uni.navigateTo({
					url:'/pagesF/customer/customer'
				})
			},
			// 进入管理
			goStore: function() {
				uni.navigateTo({
					url: '../store/store'
				});
			},
			// 进入服务
			goOrder: function() {
				uni.navigateTo({
					url: '../order/order'
				})
			},
			//进入时间管理
			goTime() {
				uni.navigateTo({
					url: '../timemam/index'
				})
			},
			//进入全部服务
			goServe() {
				uni.navigateTo({
					url: '../service/service'
				})
			}
		},
		created() {
			//获取首页信息
			HomeInfor().then(res => {
				console.log(res)
				this.datas = res[1].data.data
				console.log(this.datas)
			}).catch(err => {
				console.log(err)
			})
		}
	};
</script>
<style>
	@import "./index.css";
</style>
